<?php



class OrdersMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.OrdersMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('orders');
		$tMap->setPhpName('Orders');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ORDERS_ID', 'OrdersId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('CUSTOMERS_ID', 'CustomersId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('CUSTOMERS_NAME', 'CustomersName', 'string', CreoleTypes::VARCHAR, true, 64);

		$tMap->addColumn('CUSTOMERS_COMPANY', 'CustomersCompany', 'string', CreoleTypes::VARCHAR, false, 32);

		$tMap->addColumn('CUSTOMERS_STREET_ADDRESS', 'CustomersStreetAddress', 'string', CreoleTypes::VARCHAR, true, 64);

		$tMap->addColumn('CUSTOMERS_SUBURB', 'CustomersSuburb', 'string', CreoleTypes::VARCHAR, false, 32);

		$tMap->addColumn('CUSTOMERS_CITY', 'CustomersCity', 'string', CreoleTypes::VARCHAR, true, 32);

		$tMap->addColumn('CUSTOMERS_POSTCODE', 'CustomersPostcode', 'string', CreoleTypes::VARCHAR, true, 10);

		$tMap->addColumn('CUSTOMERS_STATE', 'CustomersState', 'string', CreoleTypes::VARCHAR, false, 32);

		$tMap->addColumn('CUSTOMERS_COUNTRY', 'CustomersCountry', 'string', CreoleTypes::VARCHAR, true, 32);

		$tMap->addColumn('CUSTOMERS_TELEPHONE', 'CustomersTelephone', 'string', CreoleTypes::VARCHAR, true, 32);

		$tMap->addColumn('CUSTOMERS_EMAIL_ADDRESS', 'CustomersEmailAddress', 'string', CreoleTypes::VARCHAR, true, 96);

		$tMap->addColumn('CUSTOMERS_ADDRESS_FORMAT_ID', 'CustomersAddressFormatId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('DELIVERY_NAME', 'DeliveryName', 'string', CreoleTypes::VARCHAR, true, 64);

		$tMap->addColumn('DELIVERY_COMPANY', 'DeliveryCompany', 'string', CreoleTypes::VARCHAR, false, 32);

		$tMap->addColumn('DELIVERY_STREET_ADDRESS', 'DeliveryStreetAddress', 'string', CreoleTypes::VARCHAR, true, 64);

		$tMap->addColumn('DELIVERY_SUBURB', 'DeliverySuburb', 'string', CreoleTypes::VARCHAR, false, 32);

		$tMap->addColumn('DELIVERY_CITY', 'DeliveryCity', 'string', CreoleTypes::VARCHAR, true, 32);

		$tMap->addColumn('DELIVERY_POSTCODE', 'DeliveryPostcode', 'string', CreoleTypes::VARCHAR, true, 10);

		$tMap->addColumn('DELIVERY_STATE', 'DeliveryState', 'string', CreoleTypes::VARCHAR, false, 32);

		$tMap->addColumn('DELIVERY_COUNTRY', 'DeliveryCountry', 'string', CreoleTypes::VARCHAR, true, 32);

		$tMap->addColumn('DELIVERY_ADDRESS_FORMAT_ID', 'DeliveryAddressFormatId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('BILLING_NAME', 'BillingName', 'string', CreoleTypes::VARCHAR, true, 64);

		$tMap->addColumn('BILLING_COMPANY', 'BillingCompany', 'string', CreoleTypes::VARCHAR, false, 32);

		$tMap->addColumn('BILLING_STREET_ADDRESS', 'BillingStreetAddress', 'string', CreoleTypes::VARCHAR, true, 64);

		$tMap->addColumn('BILLING_SUBURB', 'BillingSuburb', 'string', CreoleTypes::VARCHAR, false, 32);

		$tMap->addColumn('BILLING_CITY', 'BillingCity', 'string', CreoleTypes::VARCHAR, true, 32);

		$tMap->addColumn('BILLING_POSTCODE', 'BillingPostcode', 'string', CreoleTypes::VARCHAR, true, 10);

		$tMap->addColumn('BILLING_STATE', 'BillingState', 'string', CreoleTypes::VARCHAR, false, 32);

		$tMap->addColumn('BILLING_COUNTRY', 'BillingCountry', 'string', CreoleTypes::VARCHAR, true, 32);

		$tMap->addColumn('BILLING_ADDRESS_FORMAT_ID', 'BillingAddressFormatId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('PAYMENT_METHOD', 'PaymentMethod', 'string', CreoleTypes::VARCHAR, true, 32);

		$tMap->addColumn('CC_TYPE', 'CcType', 'string', CreoleTypes::VARCHAR, false, 20);

		$tMap->addColumn('CC_OWNER', 'CcOwner', 'string', CreoleTypes::VARCHAR, false, 64);

		$tMap->addColumn('CC_NUMBER', 'CcNumber', 'string', CreoleTypes::VARCHAR, false, 32);

		$tMap->addColumn('CC_EXPIRES', 'CcExpires', 'string', CreoleTypes::VARCHAR, false, 4);

		$tMap->addColumn('LAST_MODIFIED', 'LastModified', 'int', CreoleTypes::TIMESTAMP, false, null);

		$tMap->addColumn('DATE_PURCHASED', 'DatePurchased', 'int', CreoleTypes::TIMESTAMP, false, null);

		$tMap->addColumn('ORDERS_STATUS', 'OrdersStatus', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('ORDERS_DATE_FINISHED', 'OrdersDateFinished', 'int', CreoleTypes::TIMESTAMP, false, null);

		$tMap->addColumn('CURRENCY', 'Currency', 'string', CreoleTypes::CHAR, false, 3);

		$tMap->addColumn('CURRENCY_VALUE', 'CurrencyValue', 'double', CreoleTypes::DECIMAL, false, 14);

	} 
} 